# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"

inherit eutils subversion cmake-utils

DESCRIPTION="Powerful, cross-platform set of C++ libraries that provide developers with key components for the development of rich media applications."
HOMEPAGE="http://openlibraries.org/"
ESVN_REPO_URI="https://openlibraries.svn.sourceforge.net/svnroot/openlibraries/trunk"
LICENSE="LGPL-2.1"
KEYWORDS="~x86 ~amd64"

IUSE="+python opengl"

SLOT="0"

# Some of these are not really hard deps, but correctly handling them is difficult.
# Will fix this sometime in the future. The OpenGL dep isn't handled correctly (if it's
# installed but USE="-opengl" it will still be used.
DEPEND="media-libs/libsdl
	sys-libs/zlib
	dev-libs/boost
	dev-libs/libxml2
	dev-db/sqlite:3
	media-libs/openal
	media-libs/openexr
	opengl? ( virtual/opengl
		  media-libs/glew
		  virtual/glut )
	python? ( dev-lang/python )
	media-libs/jpeg
	media-libs/libpng"

RDEPEND="${DEPEND}"

src_configure() {
	mycmakeargs="${mycmakeargs}
			$(cmake-utils_use_with python PYTHON_EXTENSIONS)"

	cmake-utils_src_configure
}

src_install() {
	cmake-utils_src_install
	dodoc ChangeLog COPYING COPYING.rtf NEWS README doc/oml.odt
	dohtml doc/*.html
}
